﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using ResponseMonitor;
using Nini.Config;
using System.IO;
using Nini.Ini;

namespace Test4EprimeParser
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            EprimeParser parser = new EprimeParser(textBox1.Text.Trim(), "SessionProc");
        }

        private void button2_Click(object sender, EventArgs e)
        {
            string filePath = textBox1.Text.Trim();

            string _fileContent;
            using (StreamReader sr = new StreamReader(filePath, Encoding.Default))
            {
                _fileContent = sr.ReadToEnd();
            }

            string ini = _fileContent.Split(new string[] { "\r\n\r\n" }, 2, StringSplitOptions.RemoveEmptyEntries)[1];
            byte[] bs = System.Text.Encoding.Default.GetBytes(ini);
            MemoryStream ms = new MemoryStream(bs);

            //IniDocument id = new IniDocument(filePath);
            IniConfigSource source = new IniConfigSource(ms);
            
        }
    }
}
